package com.mtw.bbs.constant;


/**
 * 点赞动作枚举
 */
public enum LikeOperateEnum {

    // 无操作
    NONE("NONE"),
    // 操作失败
    FAIL("FAIL"),
    // 点赞
    LIKE_PLUS("LIKE_PLUS"),
    // 取消点赞
    LIKE_MINUS("LIKE_MINUS"),
    // 取消踩并点赞
    DISLIKE_TO_LIKE("DISLIKE_TO_LIKE"),
    // 踩
    DISLIKE_PLUS("DISLIKE_PLUS"),
    // 取消踩
    DISLIKE_MINUS("DISLIKE_MINUS"),
    // 取消点赞并踩
    LIKE_TO_DISLIKE("LIKE_TO_DISLIKE");



    /**
     * 唯一code
     */
    private String uCode;



    LikeOperateEnum(String uCode) {
        this.uCode = uCode;
    }


    public String getUCode(){
        return uCode;
    }




    public boolean isSuccess(){
       return !(LikeOperateEnum.FAIL.getUCode().equals(this.uCode)  || LikeOperateEnum.NONE.getUCode().equals(this.uCode));
    }

    public boolean isFail(){
        return LikeOperateEnum.FAIL.getUCode().equals(this.uCode);
    }







}
